home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 19 / Mac Magazin and MacEasy Magazine CD - Issue 19.iso / Musik & Kunst / Ear Workout 2.1 / source code / ear_prototypes.h < prev    next >
Text File  |  1996-01-09  |  6KB  |  154 lines

  1. void make_chord_help_window();
  2. //----------------------------------------------------------------
  3. //    from ear_calc.h
  4. //----------------------------------------------------------------
  5. void make_wave_table(unsigned char *final_wave_table,
  6.         double *temp_wave_table,
  7.         int kind,
  8.         double amplitude,
  9.         int wave_table_size,
  10.         int make_temp_wave_table);
  11. double random_double();
  12. void init_random();
  13. int random_integer(int n);
  14. double small_integer_ratio();
  15. int small_integer();
  16. void bail_out(char *);
  17. int fget_line(char *line,FILE *f);
  18. void debug_print(char *message);
  19. double choose_duration(double typical_tempo);
  20. //----------------------------------------------------------------
  21. //    from ear_mac_util.cp
  22. //----------------------------------------------------------------
  23. #if NEED_MAC_STUFF
  24. void copy_pascal_string(Str255 to,Str255 from);
  25. void watch_cursor();
  26. void arrow_cursor();
  27. void normal_text_style();
  28. #endif
  29. //----------------------------------------------------------------
  30. //    from ear_sound.cp
  31. //----------------------------------------------------------------
  32. #if NEED_MAC_STUFF
  33. void do_waveforms(
  34.     SndChannelPtr *my_snd_chan,
  35.     int kind,
  36.     double amplitude,
  37.     int chans_used,
  38.     unsigned char *wave_table,
  39.     double *temp_storage,
  40.     int wave_table_size);
  41. void install_waveforms(int nchan,SndChannelPtr *my_snd_chan,
  42.     unsigned char *my_wave_table,int wave_table_size,
  43.     short *kind_of_chan_list);
  44. void play_chord(int notes_in_chord,
  45.     SndChannelPtr *my_snd_chan,
  46.     int *note,
  47.     int duration, //-- in half-milliseconds
  48.     int if_wait);
  49. void wait_until_chan_not_busy(SndChannelPtr my_snd_chan,int max_secs);
  50. void rest(int nhalf_ms);
  51. void delay_some(int nticks);
  52. void make_sound_channels(
  53.     int chans_used,
  54.     long *init_chan_list,
  55.     short *kind_of_chan_list,
  56.     SndChannelPtr *my_snd_chan);
  57. void dispose_of_chans(
  58.     int chans_used,
  59.     SndChannelPtr *my_snd_chan);
  60. void set_up_sound();
  61. #endif
  62.     // ...NEED_MAC_STUFF
  63. //----------------------------------------------------------------
  64. //    from ear_chord_calc.cp
  65. //----------------------------------------------------------------
  66. int make_canonical_voicing(int *canonical_voicing,int *chord,int n_notes);
  67. int compare_squishedness(int *a,int *b,int n_notes);
  68. int same_canonical_form(int *a,int na,int *b,int nb);
  69. int compare_chords(int *a,int *b,int n_notes);
  70. int identical_chords(int *a,int *b,int n_notes);
  71. int dissonance(int *chord,int n_notes);
  72. void copy_chord(int *a,int *b,int n);
  73. void swap_chords(int *a,int *b,int n);
  74. int make_0_to_11(int n);
  75. int inversion_of_interval(int n);
  76. void sort_int_list(int *a,int n);
  77. void make_chord(int *chord,int *n,int *chord_items,int n_items);
  78. void add_note_to_chord(int *chord,int *n,int note);
  79. void remove_note_from_chord(int *chord,int *n,int note);
  80. int how_unusual_is_basic_chord(int basic_chord);
  81. int how_unusual_is_added_tone(int tone);
  82. double avg_chord(int *chord,int n);
  83. int is_in_list(int *list,int n,int what);
  84. void add_to_list(int *list,int *n,int what);
  85. void remove_from_list(int *list,int *n,int what);
  86. int where_in_list(int *list,int n,int what);
  87. void describe_chord(char *s,int n,int *items);
  88. void describe_basic_chord(char *s,int basic);
  89. void describe_added_tone(char *s,int basic);
  90. void simplify_chord(int *items,int *n);
  91. int items_describe_same_chord(int *items1,int nitems1,int *items2,int nitems2);
  92. int find_basic_chord(int *items,int n);
  93. int what_is_3_of_chord(int basic_chord);
  94. int what_is_5_of_chord(int basic_chord);
  95. int what_is_7_of_chord(int basic_chord);
  96. void remove_doublings(int *chord,int *n);
  97. int how_unusual_is_chord(int *items,int n);
  98. int note_to_chord_item(int note);
  99. void analyze_chord_based_on_this_root(int *items,int *n_items,int *ch,int n,int root);
  100. void notes_to_items(int *items,int *n_items,int *chord,int n_notes);
  101. unsigned long canonical_voicing_to_quick_label(int *notes,int n);
  102. int quick_label_to_canonical_chord_number(unsigned long quick_label,int n_notes);
  103. unsigned long notes_to_quick_label(int *notes,int n);
  104. int chord_item_to_interval(int item);
  105. int chord_item_to_scale_position(int item);
  106. int letter_and_accidental_to_note(int letter,int accidental);
  107. void spell_note_as_part_of_chord(
  108.     int *err,            // == 0 normally
  109.     int *note_letter,        // C=0, D=1, ... B=6
  110.     int *accidental,        // natural=0, flat=-1, sharp=1, double flat=-2, ...
  111.     int interval_above_root,    // note to spell, in units of semitones
  112.     int root_letter,
  113.     int root_accidental,
  114.     int *items,
  115.     int n_items,
  116.     int spell_dim7_enharmonically);
  117. int lists_are_same_except_for_order(int n1,int *l1,int n2,int *l2);
  118. int nifty_chord_number(int *notes,int n);
  119. void describe_accidental(char *s,int accidental);
  120.  
  121. //----------------------------------------------------------------
  122. //    from ear_intervals.cp
  123. //----------------------------------------------------------------
  124. void set_ctl_by_nifty_label(WindowPtr w,char *nifty_label,int nifty_index,
  125.             char *decoder_string,int value);
  126. //----------------------------------------------------------------
  127. //    from complete_window.cp
  128. //----------------------------------------------------------------
  129. class complete_window;
  130. void dummy_den_mother(complete_window *);
  131. //----------------------------------------------------------------
  132. //    from ear_staff_notation.cp
  133. //----------------------------------------------------------------
  134.     int
  135. draw_note_head(
  136.          char *verb,    // "draw","left_tangent","right_tangent", or
  137.                      // "set_r","set_h","set_phi_deg"
  138.          int x,
  139.          int y,        // center of note in current coords
  140.          int if_filled,    // filled, like 1/4 note, or open, like 1/2?
  141.          void *output_info,    // Point * for tangents
  142.          void *style_info   // pointer to double for set_r, set_h, or set_phi_deg
  143.       );
  144. void draw_staff(Rect *rec);
  145.     int
  146. draw_clef(
  147.     char *verb,        // "draw"
  148.     char *noun,        // "g_clef", "f_clef"
  149.     int x,            // horiz center of clef sign
  150.     int y,            // center line of staff
  151.     double h,        // dist between lines of staff
  152.     void *output_info,
  153.     void *style_info);
  154.